-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and simplify org name regex #60
Conversation
d164750
to
ca73931
Compare
This ought to be sufficient.
a48d52f
to
bfdf823
Compare
bfdf823
to
0c8f02b
Compare
As for #59, this rule could equally be expressed by moving the conditional part out of the selector, and into a condition. For #59, the rule looks cleaner using a condition. For this one, I’m not so sure (I guess it would probably need to be split up into a couple of rules.) |
findall can’t cope with conditions, which are used in the org narrative rules. XPath is required.
30d8561
to
13b3526
Compare
The decided course of action is to not add this as a Machine Actionable Rule since the benefit is tiny (it doesn't really check anything super useful) given the complication in adding it. |
Adds a test that breaks; fixes it.
It’s worth bearing in mind that the regex matcher doesn’t have the
DOTALL
flag set in either python or PHP, so you have to be careful when using it for text nodes likenarrative/text()
, that may contain newlines. This actually (sort of) breaks^(?!\s*$).+
, for instance.Refs #61; #56.